Skip to content
This repository has been archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] copy data out of DlVertices. #45355

Merged
merged 2 commits into from
Aug 31, 2023

Conversation

jonahwilliams
Copy link
Member

@jonahwilliams jonahwilliams commented Aug 31, 2023

The implementation of DLVerticesGeometry is holding onto a raw ptr that it doesn't own nor does it know that the lifecycle is deterministic. My bad!

This mostly worked (ehhh) until the stopwatch visualizer change. I've confirmed that going back to copying the data fixes the issue with the stopwatch visualizer.

Fixes flutter/flutter#133813

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@jonahwilliams
Copy link
Member Author

I manually verified the existing golden tests are still valid, and I believe these run on CI too.

Copy link
Contributor

@matanlurey matanlurey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it makes sense to mark this branched from dl_dispatcher?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to pass on doing this.

@flar
Copy link
Contributor

flar commented Aug 31, 2023

Ah, my fix was just going to be to have a shared_ptr to DlVertices in the object and to use DlVertices::Make() to make a new copy. I didn't look too closely, but this looks like it is saving an extra step as well.

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 31, 2023
@auto-submit auto-submit bot merged commit f28eb11 into flutter:main Aug 31, 2023
@jonahwilliams jonahwilliams deleted the go_back_to_copying branch September 1, 2023 00:03
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 1, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Sep 1, 2023
…133825)

flutter/engine@494fd7f...f28eb11

2023-08-31 [email protected] [Impeller] copy data out of DlVertices. (flutter/engine#45355)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App e: impeller
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

impeller::DlDispatcher::drawVertices stores a stale pointer
3 participants